<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>log-陈科衡的博客</title>

  <!-- keywords -->
  
    <meta name="keywords" content="log">
  

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="kartjim&#96;s blog">
<meta property="og:type" content="website">
<meta property="og:title" content="陈科衡的博客">
<meta property="og:url" content="https://github.com/can-dy-jack/can-dy-jack.github.io/index.html">
<meta property="og:site_name" content="陈科衡的博客">
<meta property="og:description" content="kartjim&#96;s blog">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="Kart jim">
<meta property="article:tag" content="log">
<meta name="twitter:card" content="summary">
  
    <link rel="alternative" href="/atom.xml" title="陈科衡的博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/img/logo.png">
  
  
<link rel="stylesheet" href="/css/style.css">

  
  

  
<script src="//cdn.bootcss.com/require.js/2.3.2/require.min.js"></script>

  
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>


  
      <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
<script>AV.initialize("n54fvATe6tx6CJx7XqpWsacb-gzGzoHsz", "3h43n4iW81varlSuI4gBfvIN");</script>

<script src="/js/Counter.js"></script>

  
<meta name="generator" content="Hexo 5.3.0"></head>
<body>
  <div id="container">
    <div id="particles-js"></div>
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
	<header id="header" class="inner">
		<a href="/" class="profilepic">
			
			<img lazy-src="/img/202.jpg" class="js-avatar">
			
		</a>

		<hgroup>
		  <h1 class="header-author"><a href="/"></a></h1>
		</hgroup>

		

		
			<div class="switch-btn">
				<div class="icon">
					<div class="icon-ctn">
						<div class="icon-wrap icon-house" data-idx="0">
							<div class="birdhouse"></div>
							<div class="birdhouse_holes"></div>
						</div>
						<div class="icon-wrap icon-ribbon hide" data-idx="1">
							<div class="ribbon"></div>
						</div>
						
						<div class="icon-wrap icon-link hide" data-idx="2">
							<div class="loopback_l"></div>
							<div class="loopback_r"></div>
						</div>
						
						
						<div class="icon-wrap icon-me hide" data-idx="3">
							<div class="user"></div>
							<div class="shoulder"></div>
						</div>
						
					</div>
					
				</div>
				<div class="tips-box hide">
					<div class="tips-arrow"></div>
					<ul class="tips-inner">
						<li>菜单</li>
						<li>标签</li>
						
						<li>友情链接</li>
						
						
						<li>关于我</li>
						
					</ul>
				</div>
			</div>
		

		<div class="switch-area">
			<div class="switch-wrap">
				<section class="switch-part switch-part1">
					<nav class="header-menu">
						<ul>
						
							<li><a href="/">主页</a></li>
				        
							<li><a href="/archives">所有文章</a></li>
				        
							<li><a href="/tags/%E5%89%8D%E7%AB%AF">前端</a></li>
				        
						</ul>
					</nav>
					<nav class="header-nav">
						<div class="social">
							
								<a class="github" target="_blank" href="https://github.com/can-dy-jack" title="github">github</a>
					        
								<a class="zhihu" target="_blank" href="https://www.zhihu.com" title="zhihu">zhihu</a>
					        
						</div>
					</nav>
				</section>
				
				
				<section class="switch-part switch-part2">
					<div class="widget tagcloud" id="js-tagcloud">
						<a href="/tags/TypeScript/" style="font-size: 10px;">TypeScript</a> <a href="/tags/andriod/" style="font-size: 12.5px;">andriod</a> <a href="/tags/css/" style="font-size: 10px;">css</a> <a href="/tags/default/" style="font-size: 10px;">default</a> <a href="/tags/first/" style="font-size: 12.5px;">first</a> <a href="/tags/hexo/" style="font-size: 12.5px;">hexo</a> <a href="/tags/html/" style="font-size: 12.5px;">html</a> <a href="/tags/java/" style="font-size: 10px;">java</a> <a href="/tags/javascript/" style="font-size: 12.5px;">javascript</a> <a href="/tags/kotlin/" style="font-size: 12.5px;">kotlin</a> <a href="/tags/post/" style="font-size: 10px;">post</a> <a href="/tags/simple/" style="font-size: 10px;">simple</a> <a href="/tags/time/" style="font-size: 10px;">time</a> <a href="/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 17.5px;">前端</a> <a href="/tags/%E5%AE%98%E7%BD%91%E5%AD%A6%E4%B9%A0/" style="font-size: 15px;">官网学习</a> <a href="/tags/%E9%9A%8F%E7%AC%94/" style="font-size: 20px;">随笔</a>
					</div>
				</section>
				
				
				
				<section class="switch-part switch-part3">
					<div id="js-friends">
					
			          <a target="_blank" class="main-nav-link switch-friends-link" href="https://github.com/smackgg/hexo-theme-smackdown">smackdown</a>
			        
			          <a target="_blank" class="main-nav-link switch-friends-link" href="http://kartjim.gitee.io/kartpress">kartpress</a>
			        
			          <a target="_blank" class="main-nav-link switch-friends-link" href="http://moriafly.xyz">moriafly`web</a>
			        
			          <a target="_blank" class="main-nav-link switch-friends-link" href="https://github.com/can-dy-jack/jim">jim</a>
			        
			        </div>
				</section>
				

				
				
				<section class="switch-part switch-part4">
				
					<div id="js-aboutme">陈科衡，上海海洋大学在校生。</div>
				</section>
				
			</div>
		</div>
	</header>				
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
  	<div class="overlay">
  		<div class="slider-trigger"></div>
  		<h1 class="header-author js-mobile-header hide"></h1>
  	</div>
	<div class="intrude-less">
		<header id="header" class="inner">
			<div class="profilepic">
				<img lazy-src="/img/202.jpg" class="js-avatar">
			</div>
			<hgroup>
			  <h1 class="header-author"></h1>
			</hgroup>
			
			<nav class="header-menu">
				<ul>
				
					<li><a href="/">主页</a></li>
		        
					<li><a href="/archives">所有文章</a></li>
		        
					<li><a href="/tags/%E5%89%8D%E7%AB%AF">前端</a></li>
		        
		        <div class="clearfix"></div>
				</ul>
			</nav>
			<nav class="header-nav">
				<div class="social">
					
						<a class="github" target="_blank" href="https://github.com/can-dy-jack" title="github">github</a>
			        
						<a class="zhihu" target="_blank" href="https://www.zhihu.com" title="zhihu">zhihu</a>
			        
				</div>
			</nav>
		</header>				
	</div>
</nav>
      <div class="body-wrap">
  
    <article id="post-new" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/all/new/" class="article-date">
  	<time datetime="2020-12-26T12:20:47.000Z" itemprop="datePublished">2020-12-26</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/all/new/">
        new
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="issue："><a href="#issue：" class="headerlink" title="issue："></a>issue：</h2><ul>
<li>leancloud阅读量异常</li>
<li>添加音乐</li>
</ul>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      

      
        
<div class="counter-tag counter">
    <span id="/all/new/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="new">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-文章摘要" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/all/%E6%96%87%E7%AB%A0%E6%91%98%E8%A6%81/" class="article-date">
  	<time datetime="2020-12-26T03:19:18.000Z" itemprop="datePublished">2020-12-26</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/all/%E6%96%87%E7%AB%A0%E6%91%98%E8%A6%81/">
        文章摘要
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="文章摘要"><a href="#文章摘要" class="headerlink" title="文章摘要:"></a>文章摘要:</h2><h4 id="在需要显示摘要的地方添加如下代码即可："><a href="#在需要显示摘要的地方添加如下代码即可：" class="headerlink" title="在需要显示摘要的地方添加如下代码即可："></a>在需要显示摘要的地方添加如下代码即可：</h4><blockquote>
<p>以上是摘要<br>&lt;!–more–&gt;<br>以下是余下全文</p>
</blockquote>
<h4 id="more以上内容即是文章摘要，在主页显示，more以下内容点击『-more-gt-gt-』链接打开全文才显示。"><a href="#more以上内容即是文章摘要，在主页显示，more以下内容点击『-more-gt-gt-』链接打开全文才显示。" class="headerlink" title="more以上内容即是文章摘要，在主页显示，more以下内容点击『 more &gt;&gt; 』链接打开全文才显示。"></a>more以上内容即是文章摘要，在主页显示，more以下内容点击『 more &gt;&gt; 』链接打开全文才显示。</h4>
      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%AE%98%E7%BD%91%E5%AD%A6%E4%B9%A0/" rel="tag">官网学习</a></li></ul>
	</div>

      

      
        
<div class="counter-tag counter">
    <span id="/all/%E6%96%87%E7%AB%A0%E6%91%98%E8%A6%81/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="文章摘要">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
        <p class="article-more-link">
          <a  href="/all/%E6%96%87%E7%AB%A0%E6%91%98%E8%A6%81/#more">more >></a>
        </p>
      
    
  </div>
  
</article>







  
    <article id="post-fancybox" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/all/fancybox/" class="article-date">
  	<time datetime="2020-12-26T02:48:53.000Z" itemprop="datePublished">2020-12-26</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/all/fancybox/">
        fancybox
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="fancybox效果"><a href="#fancybox效果" class="headerlink" title="fancybox效果"></a>fancybox效果</h1><p>设置fancybox: true即可？</p>
<h2 id="photo"><a href="#photo" class="headerlink" title="photo:"></a>photo:</h2><p>图片来源：<a target="_blank" rel="noopener" href="https://blog.smackgg.cn/2015/05/25/newHexo">https://blog.smackgg.cn/2015/05/25/newHexo</a><br><img src="http://bruce.u.qiniudn.com/2013/11/27/reading/photos-0.jpg" alt="girl"><br><img src="http://bruce.u.qiniudn.com/2013/11/27/reading/photos-1.jpg" alt="book"></p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      

      
        
<div class="counter-tag counter">
    <span id="/all/fancybox/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="fancybox">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-and-的区别" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E9%9A%8F%E7%AC%94/and-%E7%9A%84%E5%8C%BA%E5%88%AB/" class="article-date">
  	<time datetime="2020-12-25T07:55:44.000Z" itemprop="datePublished">2020-12-25</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E9%9A%8F%E7%AC%94/and-%E7%9A%84%E5%8C%BA%E5%88%AB/">
        /,./and../的区别
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <blockquote>
<p>/表示根目录<br>./表示当前目录<br>../表示父级目录</p>
</blockquote>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/">随笔</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E9%9A%8F%E7%AC%94/and-%E7%9A%84%E5%8C%BA%E5%88%AB/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="/,./and../的区别">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-防止渲染README-md文件" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E5%89%8D%E7%AB%AF/%E9%98%B2%E6%AD%A2%E6%B8%B2%E6%9F%93README-md%E6%96%87%E4%BB%B6/" class="article-date">
  	<time datetime="2020-12-25T02:19:27.000Z" itemprop="datePublished">2020-12-25</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E5%89%8D%E7%AB%AF/%E9%98%B2%E6%AD%A2%E6%B8%B2%E6%9F%93README-md%E6%96%87%E4%BB%B6/">
        防止渲染README.md文件
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="hexo-amp-amp-github防止渲染README-md文件"><a href="#hexo-amp-amp-github防止渲染README-md文件" class="headerlink" title="hexo &amp;&amp; github防止渲染README.md文件"></a>hexo &amp;&amp; github防止渲染README.md文件</h1><h2 id="README-md"><a href="#README-md" class="headerlink" title="README.md"></a>README.md</h2><p>以前每次hexo写完博客</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo d </span><br></pre></td></tr></table></figure>
<p> 推到github都会将README.md文件渲染成HTML文件，这样很不方便。<br> 于是就想着能不能修改配置文件 _config.yml 来避免将README.md文件渲染成HTML文件。<br> 终于在_config.yml 找到：<code>skip_render: </code><br> 改为<code>skip_render: README.md</code>即可</p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/hexo/" rel="tag">hexo</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E5%89%8D%E7%AB%AF/%E9%98%B2%E6%AD%A2%E6%B8%B2%E6%9F%93README-md%E6%96%87%E4%BB%B6/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="防止渲染README.md文件">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-JavaScript-part2" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E5%89%8D%E7%AB%AF/%E9%9A%8F%E7%AC%94/JavaScript-part2/" class="article-date">
  	<time datetime="2020-12-24T15:00:16.000Z" itemprop="datePublished">2020-12-24</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E5%89%8D%E7%AB%AF/%E9%9A%8F%E7%AC%94/JavaScript-part2/">
        JavaScript-part2
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="JavaScript"><a href="#JavaScript" class="headerlink" title="JavaScript"></a>JavaScript</h1><h2 id="文件注释和缩放"><a href="#文件注释和缩放" class="headerlink" title="文件注释和缩放"></a>文件注释和缩放</h2><ul>
<li>注释会增加JavaScript源文件的大小，但是影响较小，可以忽略不计。</li>
<li>在JavaScript正式使用版本一般会清楚文件里的注释和空白，即压缩版本，一般后缀为.min.js。<h2 id="变量"><a href="#变量" class="headerlink" title="变量"></a>变量</h2></li>
<li>变量区分大小写</li>
<li>命名规则一般是：”驼峰大小写“<h2 id="操作符"><a href="#操作符" class="headerlink" title="操作符"></a>操作符</h2>操作符优先级与其他语言一样，如 java、PHP等。<h2 id="基本-事件（event）"><a href="#基本-事件（event）" class="headerlink" title="基本 事件（event）"></a>基本 事件（event）</h2>JavaScript使用事件处理器（event handler）来处理事件。<br>常见的有三个：</li>
</ul>
<ul>
<li><input disabled="" type="checkbox"> onClick<ul>
<li>鼠标点击效果</li>
</ul>
</li>
<li><input disabled="" type="checkbox"> onMouseOver<ul>
<li>鼠标移入效果</li>
</ul>
</li>
<li><input disabled="" type="checkbox"> onMouseOut<ul>
<li>鼠标移出效果</li>
</ul>
</li>
</ul>
<h3 id="Demo"><a href="#Demo" class="headerlink" title="Demo"></a>Demo</h3><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="meta-keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">title</span>&gt;</span>图像翻滚 Demo<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">&quot;favicon.png&quot;</span> <span class="attr">alt</span>=<span class="string">&quot;onMouseOver&quot;</span> <span class="attr">onmousemove</span>=<span class="string">&quot;this.src=&#x27;test/timg.jpeg&#x27;;&quot;</span> <span class="attr">onmouseout</span>=<span class="string">&quot;this.src=&#x27;favicon.png&#x27;;&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/javascript/" rel="tag">javascript</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E5%89%8D%E7%AB%AF/">前端</a><a class="article-category-link" href="/categories/%E5%89%8D%E7%AB%AF/%E9%9A%8F%E7%AC%94/">随笔</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E5%89%8D%E7%AB%AF/%E9%9A%8F%E7%AC%94/JavaScript-part2/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="JavaScript-part2">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-hexo插入图片" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E9%9A%8F%E7%AC%94/hexo%E6%8F%92%E5%85%A5%E5%9B%BE%E7%89%87/" class="article-date">
  	<time datetime="2020-12-24T14:16:39.000Z" itemprop="datePublished">2020-12-24</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E9%9A%8F%E7%AC%94/hexo%E6%8F%92%E5%85%A5%E5%9B%BE%E7%89%87/">
        hexo插入图片
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="hexo插入图片"><a href="#hexo插入图片" class="headerlink" title="hexo插入图片"></a>hexo插入图片</h1><p><img src="/images/clouds.jpg" alt="sky"></p>
<blockquote>
<p>将图片放在 source/images 文件夹中，<br>然后通过 ![ ](/images/image.jpg) 的方法访问它们。</p>
</blockquote>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/hexo/" rel="tag">hexo</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/">随笔</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E9%9A%8F%E7%AC%94/hexo%E6%8F%92%E5%85%A5%E5%9B%BE%E7%89%87/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="hexo插入图片">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-JavaScript文件后缀" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/all/JavaScript%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80/" class="article-date">
  	<time datetime="2020-12-22T14:01:21.000Z" itemprop="datePublished">2020-12-22</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/all/JavaScript%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80/">
        JavaScript文件后缀
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="JavaScript文件后缀"><a href="#JavaScript文件后缀" class="headerlink" title="JavaScript文件后缀"></a>JavaScript文件后缀</h1><h2 id="一般都为-js-后缀"><a href="#一般都为-js-后缀" class="headerlink" title="一般都为 .js 后缀"></a>一般都为 .js 后缀</h2><p>按照惯例，JavaScript代码文件的扩展名名.js。但从实际情况来看，胆码的名称可以使用任何扩展名，浏览器都会把其中的内容当做JavaScript代码来解释。</p>
<h2 id="放在script标签里"><a href="#放在script标签里" class="headerlink" title="放在script标签里"></a>放在script标签里</h2><p> src属性 和 写在其中的代码 只能选一个。<br> 即，要么用src属性导入，要么在其中写入代码。</p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      

      
        
<div class="counter-tag counter">
    <span id="/all/JavaScript%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="JavaScript文件后缀">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/default/hello-world/" class="article-date">
  	<time datetime="2020-12-20T11:16:39.000Z" itemprop="datePublished">2020-12-20</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/default/hello-world/">
        Hello World
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>Welcome to <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a target="_blank" rel="noopener" href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a target="_blank" rel="noopener" href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/default/" rel="tag">default</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/default/">default</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/default/hello-world/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="Hello World">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-TypeScript入门" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E5%89%8D%E7%AB%AF/TypeScript%E5%85%A5%E9%97%A8/" class="article-date">
  	<time datetime="2020-12-17T15:04:30.000Z" itemprop="datePublished">2020-12-17</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E5%89%8D%E7%AB%AF/TypeScript%E5%85%A5%E9%97%A8/">
        TypeScript入门
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="TypeScript-part01"><a href="#TypeScript-part01" class="headerlink" title="TypeScript-part01"></a>TypeScript-part01</h1><h2 id="TypeScript介绍"><a href="#TypeScript介绍" class="headerlink" title="TypeScript介绍"></a>TypeScript介绍</h2><h3 id="写在前面"><a href="#写在前面" class="headerlink" title="写在前面"></a>写在前面</h3><p> <em>程序运行的一般步骤：</em></p>
<ol>
<li><p>解析程序：程序解析为AST（抽象句树法-abstract syntax tree）；</p>
</li>
<li><p>编译：将AWT编译成为字节码；</p>
</li>
<li><p>运行：计算字节码。</p>
<h3 id="但是对于TS而言："><a href="#但是对于TS而言：" class="headerlink" title="但是对于TS而言："></a>但是对于TS而言：</h3><p>要先用编译器编译为JavaScript，然后执行以上步骤！</p>
<h3 id="TS与JS区别"><a href="#TS与JS区别" class="headerlink" title="TS与JS区别"></a>TS与JS区别</h3><blockquote>
<p>JavaScript是动态绑定类型；<br>TypeScript是静态绑定类型。</p>
</blockquote>
<blockquote>
<p>JavaScript是弱类型语言；<br>TypeScript是渐进式类型语言。</p>
</blockquote>
<blockquote>
<p>JavaScript会自动转换类型；<br>TypeScript会检查类型，并报错。</p>
</blockquote>
<h2 id="TypeScript配置"><a href="#TypeScript配置" class="headerlink" title="TypeScript配置"></a>TypeScript配置</h2></li>
</ol>
<ul>
<li>新建一个文件夹</li>
<li>初始化npm：<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm init</span><br></pre></td></tr></table></figure></li>
<li>安装TSC、TSLint、NodeJS的类型声明<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install --save-dev typescript tslint @types/node</span><br></pre></td></tr></table></figure>
<h3 id="最好安装一下全局"><a href="#最好安装一下全局" class="headerlink" title="最好安装一下全局*"></a>最好安装一下全局*</h3><h4 id="Locally-in-your-project"><a href="#Locally-in-your-project" class="headerlink" title="Locally in your project."></a>Locally in your project.</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install -D typescript</span><br><span class="line">npm install -D ts-node</span><br></pre></td></tr></table></figure>
<h4 id="Or-globally-with-TypeScript"><a href="#Or-globally-with-TypeScript" class="headerlink" title="Or globally with TypeScript."></a>Or globally with TypeScript.</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install -g typescript</span><br><span class="line">npm install -g ts-node</span><br></pre></td></tr></table></figure>
      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/TypeScript/" rel="tag">TypeScript</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E5%89%8D%E7%AB%AF/TypeScript%E5%85%A5%E9%97%A8/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="TypeScript入门">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
        <p class="article-more-link">
          <a  href="/%E5%89%8D%E7%AB%AF/TypeScript%E5%85%A5%E9%97%A8/#more">more >></a>
        </p>
      
    
  </div>
  
</article>







  
  
    <nav id="page-nav">
      <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><a class="extend next" rel="next" href="/page/2/">Next &amp;raquo;</a>
    </nav>
  
</div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info">
      <div class="footer-left">
        &copy; 2020 Kart jim
      </div>
        <div class="footer-right">
          <a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/smackgg/hexo-theme-smackdown" target="_blank">Smackdown</a>
        </div>
    </div>
  </div>
</footer>
    </div>
    
  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">



<script>
	var yiliaConfig = {
		fancybox: true,
		mathjax: true,
		animate: true,
		isHome: true,
		isPost: false,
		isArchive: false,
		isTag: false,
		isCategory: false,
		open_in_new: false
	}
</script>

<script src="/js/main.js"></script>




<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script src="//cdn.bootcss.com/mathjax/2.7.0/MathJax.js"></script>


  </div>
</body>
</html>